#!/usr/bin/php
<?PHP

echo basename(__FILE__, ".php"), PHP_EOL;
echo dirname(__DIR__), PHP_EOL;
print_r(pathinfo(__FILE__));
echo realpath("//////kyo///php-sys///1_io/../1_io/"), PHP_EOL;

if (fnmatch("*.php", "1_file.php"))
    echo "fnmatch!\n";

// exit(0);

$fp = fopen("test_file", "w");

for ($i = 0; $i < 10; ++$i) {
    fwrite($fp, "hello world!");
    sleep(1);
}

sleep(10);

fclose($fp);

